Modernize OS support, eliminate a server-side redirect for most fetches.
authorRobert Lipe <robertlipe@gpsbabel.org>
Fri, 30 Dec 2016 00:11:47 +0000 (18:11 -0600)
committerRobert Lipe <robertlipe@gpsbabel.org>
Fri, 30 Dec 2016 00:11:47 +0000 (18:11 -0600)
gui/donate.cc
gui/donate.ui
gui/mainwindow.cc
gui/upgrade.cc

index 32e072f29603c4716f59fe636af3bab7af1e4005..807635cbad6d9abae7cca758ed5a3ed12d5be05f 100644 (file)
@@ -32,6 +32,6 @@ Donate::Donate(QWidget *parent) : QDialog(parent)
 
 void Donate::contributeClicked()
 {
-  QDesktopServices::openUrl(QUrl("http://www.gpsbabel.org/contribute.html"));
+  QDesktopServices::openUrl(QUrl("https://www.gpsbabel.org/contribute.html"));
   close();
 }
index 2fae6ead20ad9f8947d0a97013f7b37b90df9f98..3377303c518fa4d115b0096979e3d7df69c75a0e 100644 (file)
@@ -48,7 +48,7 @@
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
 &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;GPSBabel is free software built and supported by volunteers. It consumes vast amounts of time to create and support the software as well as money for mapping programs, GPS receivers, and development fixtures. Please see how you can &lt;a href=&quot;http://www.gpsbabel.org&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;contribute time or via PayPal (no account needed) or Google Checkout.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;GPSBabel is free software built and supported by volunteers. It consumes vast amounts of time to create and support the software as well as money for mapping programs, GPS receivers, and development fixtures. Please see how you can &lt;a href=&quot;https://www.gpsbabel.org&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;contribute time or via PayPal (no account needed).&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
       </property>
       <property name="wordWrap">
        <bool>true</bool>
index 337b2bcb976055374eb0fe9fb4cc36148391684d..a649e3e795cd5ac9eaa35816422a644967731529 100644 (file)
@@ -1028,7 +1028,8 @@ void MainWindow::closeActionX()
   babelData_.runCount_++;
 
   QDateTime now = QDateTime::currentDateTime();
-  if ((babelData_.runCount_ > 5) && (babelData_.donateSplashed_.daysTo(now) > 30)) {
+  if ((babelData_.runCount_ == 1) ||
+      (babelData_.runCount_ > 5) && (babelData_.donateSplashed_.daysTo(now) > 30)) {
     Donate donate(0);
     if (babelData_.donateSplashed_.date() == QDate(2010,1,1))
       donate.showNever(false);
@@ -1050,7 +1051,7 @@ void MainWindow::closeEvent(QCloseEvent*)
 //------------------------------------------------------------------------
 void MainWindow::donateActionX()
 {
-  QDesktopServices::openUrl(QString("http://www.gpsbabel.org/contribute.html?gbversion=" VERSION));
+  QDesktopServices::openUrl(QString("https://www.gpsbabel.org/contribute.html?gbversion=" VERSION));
 }
 
 //------------------------------------------------------------------------
index fa5cef4027b8e039350cae1174363f2457233849..08d70d8b13876f8d7979dbe09899787d955d250b 100644 (file)
@@ -57,7 +57,7 @@ UpgradeCheck::UpgradeCheck(QWidget *parent, QList<Format> &formatList,
   QObject(parent),
   manager_(0), 
   replyId_(0),
-  upgradeUrl_(QUrl("http://www.gpsbabel.org/upgrade_check.html")),
+  upgradeUrl_(QUrl("https://www.gpsbabel.org/upgrade_check.html")),
   formatList_(formatList), 
   updateStatus_(updateUnknown),
   babelData_(bd)
@@ -108,10 +108,12 @@ QString UpgradeCheck::getOsVersion()
   case QSysInfo::MV_10_8: return "10.8"; break;  // Mountain Lion
   case QSysInfo::MV_10_9: return "10.9"; break;  // Mavericks
   case QSysInfo::MV_10_10: return "10.10"; break;  // Yosemite
+  case QSysInfo::MV_10_11: return "10.11"; break;  // El Capitan
+  case QSysInfo::MV_10_12: return "10.12"; break;  // Sierra
   default:
     // This probably doesn't work...
-    if (QSysInfo::MacintoshVersion == 0x000D) {
-      return "10.11";
+    if (QSysInfo::MacintoshVersion == 0x000E) {
+      return "10.13";
       break;
     }
     return QString("Unknown Mac %1").arg(QSysInfo::MacintoshVersion);
@@ -130,6 +132,9 @@ QString UpgradeCheck::getOsVersion()
   case QSysInfo::WV_5_2: return "2003"; break;
   case QSysInfo::WV_6_0: return "Vista"; break;
   case QSysInfo::WV_6_1: return "7"; break;
+  case QSysInfo::WV_6_2: return "8"; break;
+  case QSysInfo::WV_6_3: return "8.1"; break;
+  case QSysInfo::WV_10_0: return "10"; break;
   default:
        if (QSysInfo::WindowsVersion == 0x00a0) return "8";
        if (QSysInfo::WindowsVersion == 0x00b0) return "8.1";
@@ -307,10 +312,9 @@ void UpgradeCheck::httpRequestFinished(QNetworkReply* reply)
   for (int i = 0; i < upgrades.length(); i++) {
     QDomNode upgradeNode = upgrades.item(i);
     QDomElement upgrade = upgradeNode.toElement();
-
     QString updateVersion = upgrade.attribute("version");
     if (upgrade.attribute("downloadURL").isEmpty()) {
-      downloadUrl = "http://www.gpsbabel.org/download.html";
+      downloadUrl = "https://www.gpsbabel.org/download.html";
     } else {
       downloadUrl = upgrade.attribute("downloadURL");
     }
@@ -344,6 +348,7 @@ void UpgradeCheck::httpRequestFinished(QNetworkReply* reply)
     information.setText(response);
     
     information.setInformativeText(tr("Do you wish to download an upgrade?"));
+    // The text field can be RichText, but DetailedText can't be. Odd.
     information.setDetailedText(upgradeText);
 
     switch (information.exec()) {